<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html><!doctype html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-US" xmlns:th="http://www.thymeleaf.org"> <!--<![endif]-->
<head>
    <!-- META TAGS -->
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>学习生活交流论坛</title>

    <link rel="shortcut icon" href="../static/asserts/images/login_logo.png" />

    <!-- Style Sheet-->
    <link rel='stylesheet' id='bootstrap-css-css'  href='../static/asserts/css/bootstrap5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='responsive-css-css'  href='../static/asserts/css/responsive5152.css?ver=1.0' type='text/css' media='all' />
    <link rel='stylesheet' id='pretty-photo-css-css'  href='../static/asserts/js/prettyphoto/prettyPhotoaeb9.css' type='text/css' media='all' />
    <link rel='stylesheet' id='main-css-css'  href='../static/asserts/css/main.css' type='text/css' media='all' />


    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="../static/asserts/js/html5.js"></script></script>
    <![endif]-->

</head>

<body>
<!-- Start of Header -->
<div th:replace="commons/bar::topbar(activeUri='resource')"></div>
<!-- End of Header -->

<!-- Start of Search Wrapper -->
<div class="search-area-wrapper">
    <div class="search-area container">
        <h3 class="search-header">来 ! 发 现 !</h3>
        <p class="search-tag-line">If you have any question you can ask below or enter what you are looking for!</p>
        <form action="/search" id="search-form" class="search-form clearfix" method="get"  th:action="@{/resource/search}" autocomplete="off">
            <select name="way" class="search-class">
                <option  value="title" class="select-opt">帖子</option>
                <option  value="author" class="select-opt">作者</option>
                <!--                                             <option  value="levelmore">等级大于</option>-->
                <!--                                             <option  value="levelless">等级小于</option>-->
            </select>
            <input class="search-term required" type="text" id="s" name="searchname" placeholder="搜索帖子" title="搜索帖子" />
            <input class="search-btn" type="submit" value="搜索" />
            <div id="search-error-container"></div>
            <div style="color: white; font-size: 17px; text-align: center; margin-top: 40px; margin-bottom: 0px"><b th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></b></div>

        </form>

    </div>
</div>
<!-- End of Search Wrapper -->

<!-- Start of Page Container -->
<div class="page-container">
    <div class="container">
        <div class="row">

            <!-- start of page content -->
            <div class="span8 main-listing like-btn" >
                <article class="format-standard type-post hentry clearfix" th:each="Resource:${resources}">

                    <h2 th:text="${Resource.title}"></h2>
                    <h4 >上传者：<a th:text="${Resource.author}"></a></h4>
                    <br><br>
                    <form th:action="@{/downloadfile/}+${Resource.id}" method="post" style="display:inline">
                        <input type="submit" class="diy-btn" value="下载文件" />
                    </form>

                    <form th:action="@{/delReSrc/}+${Resource.id}" method="post" style="display:inline" th:if="${session.level}==0">
                        <button type="submit" class="diy-btn " style="margin-right: 0;margin-bottom: 0">删除</button>
                    </form>

                    <hr>

                </article>

            </div>
            <!-- end of page content -->


            <!-- start of sidebar -->
            <aside class="span4 page-sidebar">

                <section class="widget">
                    <form action="/uploadfile" th:action="@{/uploadfile}" method="post" enctype="multipart/form-data">
                        <h3>资源标题</h3>
                        <input type="text" name="title" style="width:285px" required>
                        <input type="file" name="file" id="file" required>
                        <br><br>
                        <input type="submit" class="diy-btn" value="上传资源">
<!--                        <b style="color: #46A3FF; text-align: center; margin-left: 5px;" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></b>-->
                    </form>


                    <div style="color: white; font-size: 17px; text-align: center; margin-top: 40px; margin-bottom: 0px"><b th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></b></div>

                </section>
            </aside>
            <!-- end of sidebar -->
    </div>
    </div>
</div>
<!-- End of Page Container -->


<a href="#top" id="scroll-top"></a>
<script>
    function submit(){
        var str = document.getElementById("username").innerHTML;
        setInfo(str);
    }
    //储存数据  
    function setInfo(name) {
        sessionStorage.setItem("username", name);
    }
</script>
<!-- script -->
<script type='text/javascript' src='../static/asserts/js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.easing.1.34e44.js?ver=1.3'></script>
<script type='text/javascript' src='../static/asserts/js/prettyphoto/jquery.prettyPhotoaeb9.js?ver=3.1.4'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.liveSearchd5f7.js?ver=2.0'></script>
<script type='text/javascript' src='../static/asserts/js/jflickrfeed.js'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.formd471.js?ver=3.18'></script>
<script type='text/javascript' src='../static/asserts/js/jquery.validate.minfc6b.js?ver=1.10.0'></script>
<script type='text/javascript' src='../static/asserts/js/custom5152.js?ver=1.0'></script>
</body>
</html>
